feat: v2 - ai assistent - debug agent#2332
Merged
Merged
Conversation
This was referenced May 28, 2026
🎩 PreviewA preview build has been created at: |
Collaborator
Author
This was referenced May 28, 2026
7cec3fc to
7dc9561
Compare
21732c0 to
b490705
Compare
7dc9561 to
7688762
Compare
This was referenced May 28, 2026
7688762 to
c2bd0c1
Compare
95377e0 to
c9e1443
Compare
c2bd0c1 to
95746f5
Compare
c9e1443 to
ecac04d
Compare
95746f5 to
d9d21ad
Compare
8 tasks
Collaborator
|
To clarify: this does not make the ai chat available on the runs page? I think there's limited use of querying a failed run in the UI without actually being able to see it, but I presume that's functionality intended to come later |
Collaborator
|
Second clarification: does this only work on pipelines with failed runs? I asked for the status of my latest run and it told me it couldn't do it. Same when I asked it to rerun a pipeline that had no issues on it. |
camielvs
reviewed
Jun 1, 2026
camielvs
reviewed
Jun 1, 2026
camielvs
reviewed
Jun 1, 2026
camielvs
reviewed
Jun 1, 2026
camielvs
reviewed
Jun 1, 2026
camielvs
reviewed
Jun 1, 2026
Comment on lines
+63
to
+68
| // The bridge closes over the navigation + undo stores plus the | ||
| // backend/auth/queryClient deps captured via refs. A single instance | ||
| // per AiChatContent mount is correct: each method call re-reads | ||
| // `navigation.rootSpec`, the active path, and the latest backend | ||
| // values lazily so navigation / backend changes are picked up | ||
| // without rebuilding the bridge. |
Collaborator
There was a problem hiding this comment.
this comment might not be needed
d9d21ad to
6e69a55
Compare
0ee93e6 to
c0078c3
Compare
4530361 to
6e06f1c
Compare
c0078c3 to
44407bc
Compare
6e06f1c to
9833d39
Compare
7d87160 to
e3a6f56
Compare
9833d39 to
cf07a14
Compare
e3a6f56 to
e2879df
Compare
33c4324 to
58296c7
Compare
Mbeaulne
approved these changes
Jun 2, 2026
Collaborator
Author
Merge activity
|
58296c7 to
c45f945
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Introduces a
debug-assistantsub-agent that diagnoses failed pipeline runs by inspecting execution details, container state, and truncated logs. The agent is read-only and cannot mutate the pipeline spec or submit runs.The dispatcher is refactored from a handoff-based architecture to an
Agent.asTool(...)architecture, where each specialist (ask_general_help,ask_pipeline_repair,ask_debug_assistant) is exposed as a tool. This allows the dispatcher's own LLM loop to chain multiple specialist calls in a single turn — for example, callingask_debug_assistantto identify a root cause and thenask_pipeline_repairto apply the fix, without requiring a separate user message.pipeline-repairgains access tosubmit_pipeline_runso it can resubmit a run after a successful fix when the user explicitly requests it. The repair prompt is updated with a directive-based entry path: when the dispatcher passes a concrete CSOM mutation directive (e.g. derived from a debug-assistant diagnosis), pipeline-repair skips the validation-driven discovery flow and applies the targeted mutation directly.The
AgentSessionnow carriesrecentRuns, a list of the five most recent pipeline runs for the open pipeline. These are appended to the debug-assistant's system prompt at agent creation time so the model can resolve "my last run" or "the latest run" without an extra tool call.New
runToolsanddebugToolsfactories exposesubmit_pipeline_run,get_run_status,debug_pipeline_run,get_execution_details,get_execution_state,get_container_state, andget_container_logas agent tools. ThetoolBridgeimplements the correspondingToolBridgeApimethods, including a compositedebugPipelineRunthat fetches the run, root execution state, and a truncated snapshot of every failed child execution in a single call. Payload truncation (log text capped at 8 KB,debug_infocapped at 20 keys) is applied both in the bridge and in thedebugToolslayer to prevent large pod logs from consuming the model's context window.The
AiChatContentcomponent fetches recent runs for the open pipeline via React Query and passes them through to the worker on eachaskcall. ThefetchContainerLoghelper is extracted intoexecutionServiceand reused by both the existing logs UI component and the new bridge methods.Observability status labels are added for the three new
ask_*tool names so the status line updates correctly while a specialist is working inside a nestedasToolrun.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
AI Assistant - Debug agent.mov (uploaded via Graphite)
Test Instructions
Fix to apply:directive if the cause is a single concrete input value error.ask_debug_assistantfollowed byask_pipeline_repairand return a combined diagnosis + change summary.ask_general_help.Additional Comments
The
Agent.asTool(...)migration means theagent_handoffevent no longer fires from the dispatcher. TheSUB_AGENT_LABELSmap inobservability.tsis retained for any sub-agent that uses internal handoffs, but the dispatcher's specialists are now covered by theask_*entries underTOOL_STATUS_LABELS.